package com.haoniu.module.service.impl;

import com.haoniu.common.support.Convert;
import com.haoniu.module.domain.database.LuckWheelRecord;
import com.haoniu.module.mapper.LuckWheelRecordMapper;
import com.haoniu.module.service.LuckWheelRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 大转盘记录 服务层实现
 *
 * @author houyijun
 * @date 2019-03-20
 */
@Service
public class LuckWheelRecordServiceImpl implements LuckWheelRecordService {
    @Autowired
    private LuckWheelRecordMapper luckWheelRecordMapper;

    /**
     * 查询大转盘记录信息
     *
     * @param id 大转盘记录ID
     * @return 大转盘记录信息
     */
    @Override
    public LuckWheelRecord selectLuckWheelRecordById(Integer id) {
        return luckWheelRecordMapper.selectLuckWheelRecordById(id);
    }

    /**
     * 查询大转盘记录列表
     *
     * @param luckWheelRecord 大转盘记录信息
     * @return 大转盘记录集合
     */
    @Override
    public List<LuckWheelRecord> selectLuckWheelRecordList(LuckWheelRecord luckWheelRecord) {
        return luckWheelRecordMapper.selectLuckWheelRecordList(luckWheelRecord);
    }

    /**
     * 新增大转盘记录
     *
     * @param luckWheelRecord 大转盘记录信息
     * @return 结果
     */
    @Override
    public int insertLuckWheelRecord(LuckWheelRecord luckWheelRecord) {
        return luckWheelRecordMapper.insertLuckWheelRecord(luckWheelRecord);
    }

    /**
     * 修改大转盘记录
     *
     * @param luckWheelRecord 大转盘记录信息
     * @return 结果
     */
    @Override
    public int updateLuckWheelRecord(LuckWheelRecord luckWheelRecord) {
        return luckWheelRecordMapper.updateLuckWheelRecord(luckWheelRecord);
    }

    /**
     * 删除大转盘记录对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteLuckWheelRecordByIds(String ids) {
        return luckWheelRecordMapper.deleteLuckWheelRecordByIds(Convert.toStrArray(ids));
    }

}
